﻿namespace DreamBuilder.Common
{
    using DreamBuilder.Core.DAO;
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Data.Common;
    using System.Runtime.InteropServices;

    public interface IDataAccess
    {
        bool CheckFieldValueExist(string sTableCode, string[] sUQFields, object[] sDataValues);
        bool CheckFieldValueExistExceptTheValue(string sTableCode, string[] sUQFields, object[] sDataValues, string sPKField, string p);
        void DeleteData(List<IDeleteData> deleteList);
        void DeleteData(DataSet dsSave);
        DataTable GetFKRefByOtherTables(string sRefTableCode);
        DataTable GetRestrictFKSInfo(string sTableCode);
        DataTable GetRestrictUQInfoByTable(string sTableCode);
        void SaveData(DataSet dsSave);
        void SaveData(DataSet dsOut, DataSet dsSave, DataTableMappingCollection tableMappings, string[] primaryKeys, IKeyGen[] keyGens);
        void SaveData(out DataSet dsOut, DataSet dsSave, string[] tables, string[] primaryKeys, IKeyGen[] keyGens);
    }
}

